<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>49.es10的fromEntries</title>
</head>
<body>
<script>
  //将二维数组转换为对象
  let arr1 =[
          ['name','w3c'],['title','nb']
  ]

  let ob1 = Object.fromEntries(arr1)
  console.log(ob1)  //将二维数组转换成对象

  //将Map转换为对象
  let m1 = new Map()
  m1.set('name','w3c')
  m1.set('title','nb')
  let ob2 = Object.fromEntries(m1)
  console.log(ob2)
</script>
</body>
</html>